package query

type MatchPhrase struct {
	Key   string      `json:"-"`
	Value interface{} `json:"value"`
}

func (g *MatchPhrase) Empty() bool {
	return g == nil || g.Key == "" || IsAnyEmpty(g.Value)
}

func (g *MatchPhrase) Map() Map {
	return Map{"match_phrase": Map{g.Key: Map{"value": g.Value}}}
}
